<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<title>手机商城</title>
<!-- CSS -->
<link rel="stylesheet" href="{url:#css/materialize.min.css}" />
<link rel="stylesheet" href="{url:#css/me.css}" />
<link rel="stylesheet" href="{url:#css/iconfont.css}" />

<style type="text/css">
/**去除绿色下划线 - 开始*/
input::-webkit-input-placeholder {
    color: #7e7e7e;
    text-indent: 5px;
}
input:not([type]),input[type=text],input[type=password],input[type=email],input[type=url],input[type=time],input[type=date],input[type=datetime-local],input[type=tel],input[type=number],input[type=search],textarea.materialize-textarea{background-color:transparent;border:none;border-radius:0;outline:none;height:1.5em;width:100%;font-size:1rem;margin:0;padding:0;box-shadow:none;}
input:not([type]):focus:not([readonly]),input[type=text]:focus:not([readonly]),input[type=password]:focus:not([readonly]),input[type=email]:focus:not([readonly]),input[type=url]:focus:not([readonly]),input[type=time]:focus:not([readonly]),input[type=date]:focus:not([readonly]),input[type=datetime-local]:focus:not([readonly]),input[type=tel]:focus:not([readonly]),input[type=number]:focus:not([readonly]),input[type=search]:focus:not([readonly]),textarea.materialize-textarea:focus:not([readonly]){border-bottom:none;box-shadow:none}
/**去除绿色下划线 - 结束*/

/*开始*/
.q-rsub
{
	text-align:right;
	padding:5px 0px;
}
q-rteu
{
	padding:5px;}
.q-rsum
{
	width:50px;
	height:30px;
	background-color:#C00;
	margin-right:10px;
	border:none;
	color:#FFF;
	font-family:"微软雅黑";
}

.q-rtine
{
	width:330px;
	height:50px;
	margin:5px 0px;
	background-color:#f9e4be;
}

.q-rtane
{
	width:330px;
	height:50px;
	margin:5px 0px;
	background-color:#b5e5f1;
}
.q-rtine-left
{
	width:320px;
	height:30px;
	line-height:30px;
	margin:0 auto;
}
.q-rtine-right
{
	width:320px;
	height:20px;
	line-height:20px;
	text-align:right;
	margin:0 auto;
}
.q-rkain
{
	font-weight:bold;
}
/*结束*/
</style>
<!-- JS -->
<script src="{url:#js/jquery-1.11.3.min.js}"></script>
<script src="{url:#js/materialize.min.js}"></script>
<script src="{url:#js/home/register.js}"></script>
<script src="{url:#js/yang_check.js}"></script>


</head>
<body class="q-body">
<!-- TitleBar 开始 -->
<div class="navbar-fixed">
  <nav>
    <div class="nav-wrapper red accent-4 valign-wrapper">
      <ul class="left" id="nav-btn-left" onclick="document.location.href='{url:/user/user_center}'">
        <li><a><i class="iconfont">&#xe63c;</i></a></li>
      </ul>
      <span class="title-bar-size center_align">在线留言</span>
      <ul class="right">
        <li><a  class="disabled" style="visibility:hidden"><i class="iconfont">&#xe63c;</i></a></li>
      </ul>
    </div>
  </nav>
</div>
<!-- TitleBar 结束 -->

<div class="container">
	 <div class="q-reg-box">
	  <table>
          <tr>
              <td style="font-family:'微软雅黑';font-size:16px;">留言内容：</td>
           </tr>
           <tr>
              <td>
                  
                  <textarea id='question' name='question'  rows="5" cols="10" style="width:320px;height:120px; margin-top:-18px; padding:5px 10px;" placeholder="在这里输入备注..."></textarea>
                   
              </td>
          </tr>
          <tr><td class="q-rsub"><input id="btn_sub_leave_msg" type="button" value="提&nbsp;交" class="q-rsum" onclick="sub_leave_message()"></td></tr>
          <tr>
              <td style="font-family:'微软雅黑';font-size:16px;">留言记录：</td>
         </tr>
     </table>
     	 {list:items=$ly_list}
       	  <div class="q-rtine">
              <div class="q-rtine-left"><span class="q-rkain">我：</span> {$item['question']}</div>
              <div class="q-rtine-right">{$item['ask_time']}</div>
          </div>
          {if:$item['status']==1}
         <div class="q-rtane">
            <div class="q-rtine-left"><span class="q-rkain">回复：</span> {$item['content']}</div>
            <div class="q-rtine-right">{$item['reply_time']}</div>
        </div>
        {/if}
        {/list}
      
     
   </div>
 </div>

<script type="text/javascript">
/**
 * 提交留言
 */
function sub_leave_message()
{
	var question = $("#question").val();
	if(question == '')
	{
		yang_alert('留言内容不能为空');
		return;
	}
	$("#btn_sub_leave_msg").removeAttr('onclick');
	//提交留言
	$.post("{url:/mobile/ly_act}",{question:question},function(data){
		if(data['status']=='success')
	    {
		    yang_alert(data['msg']);
		    //个人中心页面
            document.location.href="{url:/mobile/leave_message}";
        }
        else
	    {
            yang_alert(data['msg']);
            document.location.href="{url:/mobile/leave_message}";
        }
    },'json');

	
}
</script>

</body>
</html>
